<!-- BEGIN .main-navigation -->
<section class="main-navigation clearfix">
    <nav>
        <?php $this->widget('BreadcrumbsWidget',array('data' => $this->breadcrumbs))?>
        <div class="title">
            Giỏ Hàng
        </div>
    </nav>
    <!-- END .main-navigation -->
</section>

<!-- BEGIN .main-content-wrapper -->
<section class="main-content-wrapper main-item-wrapper clearfix">

    <!-- BEGIN .main-cart -->
    <div class="main-cart">

        <div class="titles clearfix">
            <p class="product">Tên sản phẩm</p>
            <p class="quantity">Số lượng</p>
            <p class="price">Đơn giá</p>
        </div>

        
            <?php foreach ($cart->listProduct() as $product): ?>
            <form action="<?php echo Yii::app()->createUrl('cart/edit')?>" method="post">
                <div class="row clearfix">
                    <div class="item-block-1">
                        <!--<span class="tag-sale"></span>-->
                        <div class="image-wrapper">
                            <div class="image">

                                <a href="<?php echo $product['product']->getUrl()?>"><img src="<?php echo urlImageFolder('product') . $product['product']->getImage() ?>" style="margin: -10px 0 0 0;" alt="" /></a>
                            </div>
                        </div>
                    </div>
                    <div class="product">
                        <h4><a href="<?php echo $product['product']->getUrl()?>"><?php echo $product['product']->name; ?></a></h4>
                        
                    </div>
                    <div class="quantity">
                        <input type="text" value="<?php echo $product['quantity']?>" name="quantity" />
                        <input type="hidden" value="<?php echo $product['product']->product_id?>" name="product_id" />
                        <button class="more"></button>
                        <button class="less"></button>
                    </div>
                    <div class="price">
                        <div style="float: left">
                        <?php echo number_format($product['product']->getPrice(), 0); ?>
                        </div>
                        <div class="delete">
                            <button name="action" class="item_delete" type="submit" value="delete" title="xóa"></button>
                            <button name="action" class="item_edit" type="submit" value="edit" title="cập nhật"></button>
                        </div>
                    </div>
                        
                </div>
            </form>
            <?php endforeach; ?>


        <form action="#">
            <div class="row clearfix">
                <?php if($cart->getTotal() > 0):?>
                <div class="buttons">
                    <a class="checkout button_click">Thanh Toán</a>
                </div>
                <?php endif;?>
                <div class="total" style="float: right">
                    <label>Tổng tiền:</label>
                    <p>
                        <?php
                        echo number_format($cart->getTotal(), 0, 0, '.');
                        ?>
                        VNĐ
                    </p>
                </div>
            </div>
        </form>
        <!-- END .main-cart -->
    </div>

    <!-- END .main-content-wrapper -->
</section>